/**
 *  iBizSys 5.0 机器人生产代码（不要直接修改当前代码）
 *  http://www.ibizsys.net
 */
package com.sa.litetwo.app.rtsys.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;
import net.ibizsys.paas.appmodel.AppModelGlobal;
import net.ibizsys.paas.appmodel.IApplicationModel;
import net.ibizsys.paas.demodel.DEModelGlobal;
import net.ibizsys.paas.demodel.IDataEntityModel;
import net.ibizsys.paas.service.IService;
import net.ibizsys.paas.service.ServiceGlobal;
import net.ibizsys.paas.sysmodel.ISystemModel;
import net.ibizsys.paas.sysmodel.SysModelGlobal;
import net.ibizsys.paas.controller.ViewControllerGlobal;
import net.ibizsys.paas.ctrlmodel.ICtrlModel;
import net.ibizsys.paas.ctrlhandler.ICtrlHandler;


import com.sa.litetwo.srv.liteTwoSysModel;
import com.sa.litetwo.app.AppAppModel;


/**
 * 视图[WFStepActorActiveIconView2]控制类基类
 *
 * !! 不要对此代码进行修改
 */
@Controller
@RequestMapping(value = "/App/RTSys/WFStepActorActiveIconView2.do")
public class WFStepActorActiveIconView2Controller extends net.ibizsys.paas.controller.MDCustomViewControllerBase{
     public WFStepActorActiveIconView2Controller() throws Exception{
	 super();
         this.setId("c626ae9fd497ed03de4393fb0e68a3f5");
         this.setCaption("工作流步骤操作者");
         this.setTitle("工作流步骤操作者实体多数据自定义视图2");
         this.setAccessUserMode(2);
          //支持快速搜索
          this.setAttribute("UI.ENABLEQUICKSEARCH","TRUE");
          //
          this.setAttribute("UI.CTRL.GRID","TRUE");
          //
          this.setAttribute("UI.CTRL.GRID2","TRUE");

         ViewControllerGlobal.registerViewController("/App/RTSys/WFStepActorActiveIconView2.do",this);
         ViewControllerGlobal.registerViewController("com.sa.litetwo.app.rtsys.controller.WFStepActorActiveIconView2Controller",this);
     }
  
     
     @Override
    protected void prepareViewParam() throws Exception
    {
    	super.prepareViewParam();
      

    }

    private liteTwoSysModel liteTwoSysModel;
    
    public  liteTwoSysModel getliteTwoSysModel() {
           if(this.liteTwoSysModel==null)
           {
               try
                {
                      this.liteTwoSysModel = (liteTwoSysModel)SysModelGlobal.getSystem("com.sa.litetwo.srv.liteTwoSysModel");
                }
                catch(Exception ex)
                {
                }
           }       
           return this.liteTwoSysModel;
      }

       @Override
       public  ISystemModel getSystemModel() {
        return this.getliteTwoSysModel();
    }

       
       private AppAppModel appAppModel;
       public  AppAppModel getAppAppModel() {
            if(this.appAppModel==null)
            {
                try
                 {
                       this.appAppModel = (AppAppModel)AppModelGlobal.getApplication("com.sa.litetwo.app.AppAppModel");
                 }
                 catch(Exception ex)
                 {
                 }
            }       
            return this.appAppModel;
       }

        @Override
        public  IApplicationModel  getAppModel() {
         return this.getAppAppModel();
     }

     


     
      private net.ibizsys.psrt.srv.wf.demodel.WFStepActorDEModel wFStepActorDEModel;

      public  net.ibizsys.psrt.srv.wf.demodel.WFStepActorDEModel getWFStepActorDEModel() {
            if(this.wFStepActorDEModel==null){
                try
                {
                     this.wFStepActorDEModel = (net.ibizsys.psrt.srv.wf.demodel.WFStepActorDEModel)DEModelGlobal.getDEModel("net.ibizsys.psrt.srv.wf.demodel.WFStepActorDEModel");
                }
                catch(Exception ex)
                {
                }
            }
           return this.wFStepActorDEModel;
      }

       public  IDataEntityModel getDEModel() {
          return this.getWFStepActorDEModel();
      }
    
    public  net.ibizsys.psrt.srv.wf.service.WFStepActorService getWFStepActorService() {
    	  try
          {
               return (net.ibizsys.psrt.srv.wf.service.WFStepActorService)ServiceGlobal.getService("net.ibizsys.psrt.srv.wf.service.WFStepActorService",this.getSessionFactory());
          }
          catch(Exception ex)
          {
        	  return null;
          }
    }

     /* (non-Javadoc)
  	 * @see net.ibizsys.paas.controller.IViewController#getService()
  	 */
  	@Override
  	public IService getService()
  	{
  		return getWFStepActorService();
  	}


     


     /**
      * 准备部件模型
      * @throws Exception
      */
     @Override
     protected void prepareCtrlModels()throws Exception{
          //注册 grid2
          ICtrlModel grid2=(ICtrlModel)getliteTwoSysModel().createObject("com.sa.litetwo.app.srv.wf.ctrlmodel.WFStepDataMain2GridModel");
          grid2.init(this);
          this.registerCtrlModel("grid2",grid2);
          //注册 grid
          ICtrlModel grid=(ICtrlModel)getliteTwoSysModel().createObject("com.sa.litetwo.app.srv.wf.ctrlmodel.WFStepActorMain2GridModel");
          grid.init(this);
          this.registerCtrlModel("grid",grid);
     }
	
     /**
      * 准备部件处理对象
      * @throws Exception
      */
     @Override
     protected void prepareCtrlHandlers()throws Exception{
          //注册 grid2
          ICtrlHandler grid2 = (ICtrlHandler)getliteTwoSysModel().createObject("com.sa.litetwo.app.rtsys.ctrlhandler.WFStepActorActiveIconView2Grid2Handler");
          grid2.init(this);
          this.registerCtrlHandler("grid2",grid2);
          //注册 grid
          ICtrlHandler grid = (ICtrlHandler)getliteTwoSysModel().createObject("com.sa.litetwo.app.rtsys.ctrlhandler.WFStepActorActiveIconView2GridHandler");
          grid.init(this);
          this.registerCtrlHandler("grid",grid);
     }

 
     /**
      * 注册界面行为
      * @throws Exception
      */
     @Override
     protected void prepareUIActions()throws Exception{
	
     }
}